/*
 * Yonghuzuce.java
 *
 * Created on __DATE__, __TIME__
 */

package WindowsModule;

import java.awt.event.MouseListener;

import javax.swing.JFrame;
import javax.swing.WindowConstants;

import Tools.IMG;
import Tools.JLabelStyle;
import Tools.ToCenter;
import Windows.PicPanel;
import Windows.ShowWindows.ShowWindow;

/**
 * 
 * @author __USER__
 */
public class Yonghudenglu extends javax.swing.JFrame {
	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {
				new Yonghudenglu().setVisible(true);
			}
		});
	}

	private PicPanel mp;

	// GEN-BEGIN:variables
	// Variables declaration - do not modify
	public final javax.swing.JCheckBox jCheckBox1 = new javax.swing.JCheckBox();

	public final javax.swing.JLabel jLApply = new javax.swing.JLabel();

	public final javax.swing.JLabel jLForget = new javax.swing.JLabel();

	private javax.swing.JLabel jLabel1;

	private javax.swing.JLabel jLabel2;
	private javax.swing.JLabel jLabel3;
	private javax.swing.JLabel jLabel4;
	public final javax.swing.JPasswordField jPasswordField1 = new javax.swing.JPasswordField();
	private PicPanel jPlogo;
	public final javax.swing.JButton jbLogin = new javax.swing.JButton();
	private PicPanel jpBorder;
	public final javax.swing.JTextField jtfUserName = new javax.swing.JTextField();
	// End of variables declaration//GEN-END:variables
	/** Creates new form Yonghuzuce */
	public Yonghudenglu() {

		mp = new PicPanel(IMG.DOWNBG);
		this.setContentPane(mp);

		jPlogo = new PicPanel(IMG.banner);
		jpBorder = new PicPanel(IMG.LOGIN, IMG.DOWNLOADBG);

		initComponents();

		MouseListener ml = jpBorder.getMouseListener();

		jLApply.addMouseListener(ml);
		jLForget.addMouseListener(ml);
		jLabel1.addMouseListener(ml);
		jLabel2.addMouseListener(ml);
		jLabel3.addMouseListener(ml);
		jCheckBox1.addMouseListener(ml);
		jtfUserName.addMouseListener(ml);
		jPasswordField1.addMouseListener(ml);

		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		jLApply.addMouseListener(JLabelStyle.getStyleListener());
		jLForget.addMouseListener(JLabelStyle.getStyleListener());
		ToCenter.ToCenter(this);
		this.addWindowListener(ShowWindow.getWindowListener());
	}
	// GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		jLabel1 = new javax.swing.JLabel();
		jLabel2 = new javax.swing.JLabel();
		jLabel3 = new javax.swing.JLabel();
		jLabel4 = new javax.swing.JLabel();

		jLabel1.setText("jLabel1");

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("\u7528\u6237\u767b\u9646");

		jpBorder.setBackground(new java.awt.Color(255, 255, 255));

		jLabel2.setBackground(new java.awt.Color(255, 255, 255));
		jLabel2.setText("\u7528\u6237\u540d");

		jLabel3.setText("\u5bc6\u7801");

		jLApply.setText("\u7533\u8bf7\u5e10\u53f7");
		jLApply.addMouseListener(new java.awt.event.MouseAdapter() {
			@Override
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				jLApplyMouseClicked(evt);
			}
		});

		jLForget.setText("\u5fd8\u8bb0\u5bc6\u7801\uff1f");
		jLForget.addMouseListener(new java.awt.event.MouseAdapter() {
			@Override
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				jLForgetMouseClicked(evt);
			}
		});

		jCheckBox1.setText("\u81ea\u52a8\u767b\u9646");
		jCheckBox1.setContentAreaFilled(false);
		jCheckBox1.setFocusPainted(false);

		javax.swing.GroupLayout jpBorderLayout = new javax.swing.GroupLayout(jpBorder);
		jpBorder.setLayout(jpBorderLayout);
		jpBorderLayout.setHorizontalGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				jpBorderLayout.createSequentialGroup().addContainerGap().addGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false).addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)).addGap(14, 14, 14)
						.addGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jCheckBox1).addGroup(jpBorderLayout.createSequentialGroup().addGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jtfUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE).addComponent(jPasswordField1, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false).addComponent(jLApply, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jLForget)))).addContainerGap()));
		jpBorderLayout
				.setVerticalGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
						jpBorderLayout.createSequentialGroup().addContainerGap(17, Short.MAX_VALUE).addGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel2).addComponent(jLApply).addComponent(jtfUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(jpBorderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel3).addComponent(jLForget).addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jCheckBox1)
								.addGap(12, 12, 12)));

		jLabel4.setFont(new java.awt.Font("宋体", 1, 24));
		jLabel4.setForeground(new java.awt.Color(255, 255, 255));
		jLabel4.setText("ResShare");

		javax.swing.GroupLayout jPlogoLayout = new javax.swing.GroupLayout(jPlogo);
		jPlogo.setLayout(jPlogoLayout);
		jPlogoLayout.setHorizontalGroup(jPlogoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPlogoLayout.createSequentialGroup().addContainerGap().addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap(107, Short.MAX_VALUE)));
		jPlogoLayout.setVerticalGroup(jPlogoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPlogoLayout.createSequentialGroup().addContainerGap().addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE).addContainerGap()));

		jbLogin.setText("\u767b \u9646");

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jPlogo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jpBorder, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addContainerGap()).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(256, Short.MAX_VALUE).addComponent(jbLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap()));
		layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jPlogo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(18, 18, 18).addComponent(jpBorder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jbLogin, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addContainerGap()));

		pack();
	}// </editor-fold>
		// GEN-END:initComponents
	private void jLApplyMouseClicked(java.awt.event.MouseEvent evt) {
		new Yonghuzhuce().setVisible(true);
	}
	private void jLForgetMouseClicked(java.awt.event.MouseEvent evt) {
		new Zaohuipassword().setVisible(true);
	}

}